<?php 
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class base_c extends CI_Controller {

	public $data = array();
	public $menu = array();

	public function __construct() 
	{
		parent::__construct();
		$this->load->helper(array('url', 'text'));
		$this->load->library(array('slug', 'session', 'pagination', 'email'));
		$this->data['title'] = '';
		$this->data['keywords'] = '';
		$this->data['description'] = '';
		$this->data['page'] = '';
		$this->load->model(array('base_m', 'category_m', 'subcategory_m', 'city_m', 'profile_m', 'calendar_m', 'option_m'));

		if (!ini_get('date.timezone')) {
			date_default_timezone_set("GMT");
		}

		$this->data['menuAbout'] = $this->subcategory_m->getItems(1);
		$this->data['menuNews'] = $this->subcategory_m->getItems(3);
		$this->data['menuService'] = $this->subcategory_m->getItems(4);
		$this->data['menuServiceOther'] = $this->subcategory_m->getItems(5);
		$this->data['menuGroup'] = $this->subcategory_m->getItems(6);

		$this->data['footer'] = $this->option_m->getItem('footer');
	}

	public function loadCity()
	{
		$cmbArea = $_POST['cmbArea'];
		$this->data['city_items'] = $this->city_m->getItems($cmbArea);
		$this->load->view('partials/loadcity', $this->data);
	}
}